<template>
    <h1>key 属性管理状态</h1>
    <p v-for="(item,index) in netdata " :key="index">{{ item }}</p>

    <div v-for="item in netdata" :key="item.id">
        <p>title: {{ item.id }}</p>
        <p>title: {{ item.title }}</p>
        <p>author: {{ item.author }}</p>
        <p>publishedAt: {{ item.publishedAt }}</p>
    </div>
</template>

<script>
export default{
    data(){
        return{
            netdata:[
                {
                    id:1,
                    title: 'title1',
                    author: 'A',
                    publishedAt: '2016-04-10'
                },
                {
                    id:2,
                    title: 'title2',
                    author: 'B',
                    publishedAt: '2016-05-10'
                },
                {
                    id:3,
                    title: 'title3',
                    author: 'C',
                    publishedAt: '2016-06-10'
                }
            ],
        }
    }
}
</script>